package card;

public enum Color {
  HEART(1), DIAMOND(2), SPADE(3), CLUB(4);

  private int value;

  private Color(int value) {
    this.value = value;
  }

  static public Color from_i(int i) {
    for (Color color: Color.values())
      if (color.value == i)
        return color;

    return null;
  }

  public int get_value() {
    return this.value;
  }
}